#ifndef YCEXTENSIONFACTORY_H
#define YCEXTENSIONFACTORY_H
#include "extensiontype.h"
#include <QObject>

namespace yc {

class CreatorProject;
class ExtensionDeclaration;
class Extension;
class ExtensionManager;

// 扩展创建工厂
class YCEXTENSIONSHARED_EXPORT ExtensionFactory
{
public:
    virtual ~ExtensionFactory() { }

    virtual Extension* create(ExtensionManager* ext_mgr, const ExtensionDeclaration& decl,
                              CreatorProject* project, QWidget* container) = 0;
    virtual void destroy(Extension* e) = 0;
};

} // namespace yc

#endif // YCEXTENSIONFACTORY_H
